package cn.com.cym.gamezao.enums;

import io.swagger.annotations.ApiModel;

/**
 * 游戏等级
 */
@ApiModel("游戏等级枚举")
public enum GameLevel {
    INTRODUCTION("I","入门"),
    EASY("E","简单"),
    HARD("H","困难"),
    DEVIL("D","恶魔");

    private String sign;

    private String value;

    private GameLevel(String sign,String value){
        this.sign=sign;
        this.value=value;
    }

    public String getSign(){
        return this.sign;
    }

    public String getValue(){
        return this.value;
    }

    public  static  GameLevel fromSign(String sign){
        for(GameLevel gameLevel:GameLevel.values()){
            if(gameLevel.getSign().equals(sign)){
                return gameLevel;
            }
        }
        return  null;
    }
}
